<?
function Cut_Image_Codes($htmlimage)
{
$search = array("'<script[^>]*?>.*?</script>'si","'([\r\n])[\s]+'","'&#(\d+);'e");
$replace = array(""," ","chr(\\1)");
$htmlimage = preg_replace ($search, $replace, $htmlimage);
$htmlimage = str_replace ("|", " ", $htmlimage);
$htmlimage = str_replace ("\\", "", $htmlimage);
$htmlimage = str_replace ("'", "\"", $htmlimage);
return $htmlimage;
}

function Cut_Text_Codes($htmltext)
{
$search = array("'<script[^>]*?>.*?</script>'si","'([\r\n])[\s]+'","'&#(\d+);'e");
$replace = array(""," ","chr(\\1)");
$htmltext = preg_replace ($search, $replace, $htmltext);
$htmltext = str_replace ("|", " ", $htmltext);
$htmltext = str_replace ("\\", "", $htmltext);
$htmltext = str_replace ("'", "\"", $htmltext);
return $htmltext;
}

function Cut_Myhtml_Codes($myhtml)
{
$search = array("'<script[^>]*?>.*?</script>'si","'([\r\n])[\s]+'","'&#(\d+);'e");
$replace = array(""," ","chr(\\1)");
$myhtml = preg_replace ($search, $replace, $myhtml);
$myhtml = str_replace ("|", " ", $myhtml);
$myhtml = str_replace ("\\", "", $myhtml);
$myhtml = str_replace ("'", "\"", $myhtml);
return $myhtml;
}

function Cut_Category_Codes($category)
{
$search = array("'<script[^>]*?>.*?</script>'si","'([\r\n])[\s]+'","'&#(\d+);'e");
$replace = array(""," ","chr(\\1)");
$category = preg_replace ($search, $replace, $category);
$category = str_replace ("|", " ", $category);
$category = str_replace ("\\", "", $category);
$category = str_replace ("'", "", $category);
$category = str_replace ('"', "", $category);
return $category;
}

function import_datetime($recorde)
{
$check_date= explode(" ", $recorde);
$date1=$check_date[0];
$time=$check_date[1];
$date1= explode("-", $date1);
$date=$date1[2]."-".$date1[1]."-".$date1[0]." ".$time;	
return $date;
}

function import_date($recorde)
{
$date1=explode("-",$recorde);
$date1[2]=trim($date1[2]);
$date=$date1[2]."-".$date1[1]."-".$date1[0];	
return $date;
}


?>

